package com.clt.ess.CABeen;

import java.io.Serializable;
import java.util.List;

//证书内容变更请求(证书有效期不变)CA响应参数Two（同步）
public class ChangeSealCertResponse implements Serializable {
    //业务类型 changeSealCert
    //必须
    private String taskCode;
    //协议版本号 1.0
    //必须
    private String version;
    //返回值，0 表示成功，其他表示错误
    //必须
    private String resultCode;
    //返回信息描述
    //必须
    private String resultCodeMsg;
    //taskID的Data
    //必须
    private List<CheckResultData> data;
    //签名信息
    //必须
    private SignInfo signInfo;

    /**
     {
         " taskCode": "changeSealCert",
         "version": "1.0",
         " resultCode": "0",
         " resultCodeMsg ": "证书变更成功",
         " data ": [{
             " requestID ": "0",
             "errorCode": "0",
             "package": {
                 " signCert ": "base64编码的签名证书",
                 " encCert ": "base64编码的加密证书",
                 " encKeyProtection": " Base64编码的加密密钥对保护结构"
             }
         }],
         " signInfo": {
             " signAlgorithm ": "1.2.156.10197.1.501",
             " signValue ": " base64编码的签名值"
         }
     }
     */

    public ChangeSealCertResponse() {
    }

    public ChangeSealCertResponse(String taskCode, String version, String resultCode, String resultCodeMsg, List<CheckResultData> data, SignInfo signInfo) {
        this.taskCode = taskCode;
        this.version = version;
        this.resultCode = resultCode;
        this.resultCodeMsg = resultCodeMsg;
        this.data = data;
        this.signInfo = signInfo;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultCodeMsg() {
        return resultCodeMsg;
    }

    public void setResultCodeMsg(String resultCodeMsg) {
        this.resultCodeMsg = resultCodeMsg;
    }

    public List<CheckResultData> getData() {
        return data;
    }

    public void setData(List<CheckResultData> data) {
        this.data = data;
    }

    public SignInfo getSignInfo() {
        return signInfo;
    }

    public void setSignInfo(SignInfo signInfo) {
        this.signInfo = signInfo;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"taskCode\":\"")
                .append(taskCode).append('\"');
        sb.append(",\"version\":\"")
                .append(version).append('\"');
        sb.append(",\"resultCode\":\"")
                .append(resultCode).append('\"');
        sb.append(",\"resultCodeMsg\":\"")
                .append(resultCodeMsg).append('\"');
        sb.append(",\"data\":")
                .append(data);
        sb.append(",\"signInfo\":")
                .append(signInfo);
        sb.append('}');
        return sb.toString();
    }
}
